import pandas as pd

D = pd.Series(range(0, 20))
# print D
# print D.cumsum()

# print pd.rolling_sum(D, 2)
print D.rolling(2).sum()